<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<div id="closeParentTime" style="display:none"></div>
<script type="text/javascript">
	window.top.$('#display_center_id').css('display','none');
</script>
<div class="pad-10">
<div id="searchid" style="">
<form name="searchform" action="" method="get" >
<input type="hidden" value="reg_child" name="m">
<input type="hidden" value="recommend" name="c">
<input type="hidden" value="init" name="a">
<input type="hidden" value="1" name="search">
<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">		
				姓名：<input name="name" type="text" value="<?php echo $name?>" class="input-text"  style='width: 200px;' placeholder='输入推荐人姓名关键字可模糊查询...'/>
				手机号：<input name="tel" type="text" value="<?php echo $tel;?>" class="input-text"  style='width: 130px;' placeholder='输入手机号进行查询...'/>
				&nbsp;类型：<?php echo form::select(array('1'=>'店员','2'=>'家长','3'=>'其他'), $type, $str = 'name = "type"', '请选择');?>
				&nbsp;是否已支付：<?php echo form::select(array('1'=>'是','2'=>'否'), $is_pay, $str = 'name = "is_pay"', '请选择');?>
				<input type="submit" name="search" class="button" value="<?php echo L('search');?>" />
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>
</div>
<form name="myform" id="myform" action="" method="post" >
<div class="table-list">
    <table width="100%">
        <thead>
            <tr>
            <th width="30" align='center' >ID</th>
			<th width="100" align='center' >姓名</th>
			<th width="80" align='center' >手机号</th>
			<th width="100" align='center' >parentid</th>
            <th width="100" align='center' >root_id</th>
            <th width="120" align='center' >当次报名ID拼接</th>
            <th width="100" align='center' >类型</th>
            <th width="100" align='center' >是否支付</th>
            <th width="100" align='center' >来源</th>
            <th width="120" align='center' ><?php echo L('create_time');?></th>
            </tr>
        </thead>
<tbody>
    <?php
	if(!empty($recommend)) {
		
		foreach ($recommend as $r) {
	?>
        <tr>
		<td align='center' ><?php echo $r['id'];?></td>
		<td align='center'><?php echo $r['name']?$r['name']:'<span style="color:red;">(未设置)</span>';?></td>
		<td align='center'><?php echo $r['tel']?$r['tel']:'<span style="color:red;">(未设置)</span>';?></td>
		<td align='center'><strong><?php echo $r['parentid'];?></strong></td>
		<td align='center'><strong><?php echo $r['root_id'];?></strong></td>
		<td align='center'><?php echo $r['reg_child_model_log_ids']?'<strong>'.substr($r['reg_child_model_log_ids'],0,strlen($r['reg_child_model_log_ids'])-1).'</strong>':'<span style="color:red;">(未设置)</span>';?></td>
		<td align='center'><?php if($r['type']==1){echo '店员';}else if($r['type']==2){echo '家长';}else if($r['type']==3){echo '其他';}else{echo '<span style="color:red;">(未设置)</span>';}?></td>
		<td align='center'><?php if($r['is_pay']==0){echo '<span style="color:red;font-weight:bolder;">否</span>';}else if($r['is_pay']==1){echo '<span style="color:green;font-weight:bolder;">是</span>';}else{echo '<span style="color:red;">(未设置)</span>';}?></td>
		<td align='center'><?php if($reg_child_name[$r['reg_child_model_id']]){echo $reg_child_name[$r['reg_child_model_id']];}else{echo '<span style="color:red;">(未设置)</span>';}?></td>
		<td align='center'><?php echo $r['create_time']?$r['create_time']:'<span style="color:red;">(未设置)</span>';?></td>
	</tr>
     <?php }
	} else {
		echo "<tr><td colspan='8' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
	}
	?>
</tbody>
     </table>
    <div id="pages"><?php echo $pages;?></div>
</div>
</form>
</div>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>cookie.js"></script>
<script type="text/javascript"> 
<!--

setcookie('refersh_time', 0);
function refersh_window() {
	var refersh_time = getcookie('refersh_time');
	if(refersh_time==1) {
		window.location.reload();
	}
}
setInterval("refersh_window()", 3000);
//-->
</script>
</body>
</html>